]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
browser-plugin: Correct check for checking the hostname/protocol
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 Feb 2012 23:23:12 +0000 (18:23 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 21 Feb 2012 09:06:10 +0000 (04:06 -0500)
While it's extremely unlikely that document.location would not be an
object in the browser setting, this check is incorrect and we could
possibly crash an NPAPI host if this is the case.

https://bugzilla.gnome.org/show_bug.cgi?id=670489

browser-plugin/browser-plugin.c

index 8f7e8769640c8311eed4f0c4c256f06b2092467b..16fae1cee093accaee876d62da339a9d2ad3b562 100644 (file)
@@ -104,7 +104,7 @@ check_origin_and_protocol (NPP instance)
                           &location))
     goto out;
 
-  if (!NPVARIANT_IS_OBJECT (document))
+  if (!NPVARIANT_IS_OBJECT (location))
     goto out;
 
   hostname = get_string_property (instance,